/**
 * udp套接字事件
 * message
 * listening
 * close
 * error
 *
 */
const dgram = require('dgram')

const server = dgram.createSocket('udp4')

server.on('message',function (msg, rinfo){
    console.log(msg + rinfo)
})
server.on('listening',function (){
    var address = server.address();
    console.log("server listening " + address.address + ":" + address.port);
})
server.bind(4123)
